if (THINKER_USE_OPENMP)
  find_package(OpenMP REQUIRED)
  if (OpenMP_FOUND)
    set(CCOMMON_OPT "${CCOMMON_OPT} ${OpenMP_C_FLAGS} -DUSE_OPENMP")
  endif()
endif ()

if ( (${CMAKE_C_COMPILER_ID} STREQUAL "GNU") OR 
     (${CMAKE_C_COMPILER_ID} STREQUAL "LSB") OR 
     (${CMAKE_C_COMPILER_ID} MATCHES "Clang"))
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wall")
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-unused")
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-sign-compare")
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-narrowing")
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-write-strings")
  set(CCOMMON_OPT "${CCOMMON_OPT} -Wno-int-to-pointer-cast")
  set(CCOMMON_OPT "${CCOMMON_OPT} -fPIC")
  set(CCOMMON_OPT "${CCOMMON_OPT} -ffunction-sections")
  set(CCOMMON_OPT "${CCOMMON_OPT} -fdata-sections")
  set(CCOMMON_OPT "${CCOMMON_OPT} -lpthread")
  set(CCOMMON_LINKER_OPT "${CCOMMON_LINKER_OPT} -Wl,--gc-sections")
  set(CCOMMON_LINKER_OPT "${CCOMMON_LINKER_OPT} -Wl,--rpath=../lib")
  set(CCOMMON_LINKER_OPT "${CCOMMON_LINKER_OPT} -Wl,--rpath=../lib64")
  set(CCOMMON_LINKER_OPT "${CCOMMON_LINKER_OPT} -Wl,--rpath=./")
  set(CCOMMON_LINKER_OPT "${CCOMMON_LINKER_OPT} -Wl,--rpath-link=${PROJECT_SOURCE_DIR}/lib")
endif ()
